<?php
class AppController extends Controller {
    var $components = array('Acl', 'Auth', 'Session');

    function beforeFilter() {
    	$this->Auth->userModel = 'Usuario'; //Cambia el modelo por defecto de Auth (users) por el modelo usado en nuestra aplicacion.
        //Configure AuthComponent
        $this->Auth->authorize = 'actions';
        $this->Auth->loginAction = array('controller' => 'usuarios', 'action' => 'ingresar');
        $this->Auth->logoutRedirect = array('controller' => 'usuarios', 'action' => 'ingresar');
        $this->Auth->loginRedirect = array('controller' => 'pacientes', 'action' => 'index');
        $this->Auth->actionPath = 'controllers/';
	
    }
}
?>
